<div class="row">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <form id="my-form" class="am-form tpl-form-line-form" method="post">
                <div class="widget-body">
                    <fieldset>
                        <div class="widget-head am-cf">
                            <div class="widget-title am-fl">新增运营商</div>
                        </div>
                        <div class="am-form-group" >
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">运营商名称</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[company_name]" value=""
                                       required>
                                <input type="hidden" name="agent[type]" value="1">
                            </div>
                        </div>
                        <!--<div class="am-form-group am-padding-top">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 运营商性质 </label>
                            <div class="am-u-sm-9 am-u-end">
                                <div class="x-region-select" data-region-selected>
                                    <select name="agent[level]" data-province required>
                                        <option value="0">请选择</option>
                                        <option value="1">个人</option>
                                        <option value="2">企业</option>
                                    </select>
                                </div>
                            </div>
                        </div>-->
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">运营商性质 </label>
                            <div class="am-u-sm-9 am-u-end">
                                <label class="am-radio-inline">
                                    <input type="radio" name="agent[level]" value="2" data-am-ucheck checked>
                                    企业
                                </label>
                                <label class="am-radio-inline">
                                    <input type="radio" name="agent[level]" value="1" data-am-ucheck
                                           >
                                    个人
                                </label>
                            </div>
                        </div>
                        <div class="am-form-group otherAnswer1">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">营业执照 </label>
                            <div class="am-u-sm-9 am-u-end">
                                <div class="am-form-file">
                                    <div class="am-form-file">
                                        <button type="button"
                                                class="upload-fileyyzz am-btn am-btn-secondary am-radius">
                                            <i class="am-icon-cloud-upload"></i> 选择图片
                                        </button>
                                        <div class="uploader-list am-cf">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="am-form-group" >
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">可添加免费代言人数量</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[employees_num]" value="10"
                                       required readonly>
                            </div>
                        </div>
                        <div class="am-form-group" >
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">负责人姓名</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[real_name]" value=""
                                       required>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">联系电话</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[company_tel]" value=""
                                       required>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">参与分红百分比</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[service_charge]" value="50" readonly="true"
                                       required>
                            </div>
                        </div>

                        <!--<div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">服务商推荐运营商获得的奖金</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[operate_reward]"
                                       required>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">服务商推荐合伙人获得的奖金</label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[partner_reward]"
                                       required>
                            </div>
                        </div>-->
                        <div class="am-form-group am-padding-top-sm">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">运营商账户名 </label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="text" class="tpl-form-input" name="agent[user_name]" value=""
                                       required>
                                <small>运营商后台用户名</small>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">运营商账户密码 </label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="password" class="tpl-form-input" name="agent[password]" value=""
                                       required>
                                <small>运营商后台用户密码</small>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 确认密码 </label>
                            <div class="am-u-sm-9 am-u-end">
                                <input type="password" class="tpl-form-input" name="agent[password_confirm]" value=""
                                       required>
                            </div>
                        </div>
                        <div class="am-form-group">
                            <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                </button>
                            </div>
                        </div>
                    </fieldset>
                </div>
            </form>
        </div>
    </div>
</div>
<script id="tpl-file-item" type="text/template">
    {{ each list }}
    <div class="file-item">
        <a href="{{ $value.file_path }}" title="点击查看大图" target="_blank">
            <img src="{{ $value.file_path }}">
        </a>
        <input type="hidden" name="{{ name }}" value="{{ $value.file_id }}">
        <i class="iconfont icon-shanchu file-item-delete"></i>
    </div>
    {{ /each }}
</script>
{{include file="layouts/_template/file_library" /}}

<script src="assets/common/plugins/umeditor/umeditor.config.js?v=<?= $version ?>"></script>
<script src="assets/common/plugins/umeditor/umeditor.min.js"></script>
<!--<script src="assets/store/js/select.region.js?v=1.2"></script>-->
<script>
    $(function () {
        $('.upload-fileyyzz').selectImages({
            name: 'agent[image_id_yyzz]'
        });
        $('#my-form').superForm();
    });

    $("input[type='radio']").change(function(){
        if($(this).val()=="2"){
            $(".otherAnswer1").show();
        }
        else{
            $(".otherAnswer1").hide();
        }
    });


</script>
